<html>
<head><meta charset="utf-8"><title>Removing unnecessary RUSTC_BOOTSTRAP · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html">Removing unnecessary RUSTC_BOOTSTRAP</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="222996259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996259">(Jan 16 2021 at 18:05)</a>:</h4>
<p>Currently, bootstrap sets RUSTC_BOOTSTRAP in the following places:</p>
<div class="codehilite"><pre><span></span><code>&gt; rg RUSTC_BOOTSTRAP src/bootstrap/
src/bootstrap/builder.rs
734:            .env(&quot;RUSTC_BOOTSTRAP&quot;, &quot;1&quot;)
1170:        cargo.env(&quot;RUSTC_BOOTSTRAP&quot;, &quot;1&quot;);

src/bootstrap/test.rs
605:            .env(&quot;RUSTC_BOOTSTRAP&quot;, &quot;1&quot;);
1261:        cmd.env(&quot;RUSTC_BOOTSTRAP&quot;, &quot;1&quot;);
1523:    cmd.env(&quot;RUSTC_BOOTSTRAP&quot;, &quot;1&quot;);
2035:            .env(&quot;RUSTC_BOOTSTRAP&quot;, &quot;1&quot;)

src/bootstrap/bootstrap.py
1091:    env[&quot;RUSTC_BOOTSTRAP&quot;] = &#39;1&#39;

src/bootstrap/compile.rs
442:                    cmd.env(&quot;RUSTC_BOOTSTRAP&quot;, &quot;1&quot;)
</code></pre></div>
<p>This is almost certainly more than necessary (e.g. I found that Python setting RUSTC_BOOTSTRAP was entirely unused: <a href="https://github.com/jyn514/rust/commit/76c2973808366ec86ebc6a91cd9c17bc81d7dfec">https://github.com/jyn514/rust/commit/76c2973808366ec86ebc6a91cd9c17bc81d7dfec</a>)</p>
<p>I tried getting rid of some of these to avoid issues like <a href="https://github.com/rust-lang/rust/pull/81063#discussion_r558982774">https://github.com/rust-lang/rust/pull/81063#discussion_r558982774</a> where tools can depend on unstable features from beta, which means they are only supported for that version of beta: <a href="https://github.com/rust-lang/rust/issues/59264">https://github.com/rust-lang/rust/issues/59264</a>. Unfortunately, cargo itself needs RUSTC_BOOTSTRAP for unstable flags that are unconditionally enabled:</p>
<div class="codehilite"><pre><span></span><code>Checking std artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)
error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `beta` channel
See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels.
command did not execute successfully: &quot;/home/joshua/rustc3/build/x86_64-unknown-linux-gnu/stage0/bin/cargo&quot; &quot;check&quot; &quot;--target&quot; &quot;x86_64-unknown-linux-gnu&quot; &quot;-Zbinary-dep-depinfo&quot; &quot;-j&quot; &quot;8&quot; &quot;--release&quot; &quot;--features&quot; &quot;panic-unwind backtrace compiler-builtins-c&quot; &quot;--manifest-path&quot; &quot;/home/joshua/rustc3/library/test/Cargo.toml&quot; &quot;--message-format&quot; &quot;json-render-diagnostics&quot;
</code></pre></div>
<p>Is there a way to pass RUSTC_BOOTSTRAP <em>only</em> to cargo and not to the library being compiled? Maybe with some hackery around the <code>rustc</code> bootstrap shim?</p>



<a name="222996356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996356">(Jan 16 2021 at 18:06)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="116122">@simulacrum</span> , I think this what you meant by "Probably even more than strictly necessary, but that's a separate battle." in <a href="https://github.com/rust-lang/rust/pull/76423#discussion_r484135330">https://github.com/rust-lang/rust/pull/76423#discussion_r484135330</a></p>



<a name="222996489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996489">(Jan 16 2021 at 18:09)</a>:</h4>
<p>ah, well, I don't know exactly - I guess I personally consider the costs here fairly high (to narrowing the scope) and the benefits fairly low, within rust-lang/rust</p>



<a name="222996523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996523">(Jan 16 2021 at 18:10)</a>:</h4>
<p>the benefit I see is that if RUSTC_BOOTSTRAP is set selectively, we can make sure it's only set when compiling with ToolStd, not ToolBootstrap</p>



<a name="222996570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996570">(Jan 16 2021 at 18:10)</a>:</h4>
<p>so things like <a href="https://github.com/rust-lang/rust/issues/59264">https://github.com/rust-lang/rust/issues/59264</a> <em>can't</em> happen</p>



<a name="222996595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996595">(Jan 16 2021 at 18:10)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> I believe there's a cargo-specific environment variable equivalent to <code>RUSTC_BOOTSTRAP</code>.</p>



<a name="222996621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996621">(Jan 16 2021 at 18:11)</a>:</h4>
<p>I don't remember the exact name. You can find it in cargo's testsuite.</p>



<a name="222996622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996622">(Jan 16 2021 at 18:11)</a>:</h4>
<p>I searched <code>BOOTSTRAP</code> and I only see RUSTC_BOOTSTRAP</p>



<a name="222996625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996625">(Jan 16 2021 at 18:11)</a>:</h4>
<p>Yeah, I guess, but realistically things like that are not yet entirely possible - compiletest, for example, has feature(test)</p>



<a name="222996683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996683">(Jan 16 2021 at 18:12)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP/near/222996625">said</a>:</p>
<blockquote>
<p>Yeah, I guess, but realistically things like that are not yet entirely possible - compiletest, for example, has feature(test)</p>
</blockquote>
<p>this is exactly my point though - compiletest is built against master libstd instead of beta libstd so that it can be built with either the beta or master rustc</p>



<a name="222996685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996685">(Jan 16 2021 at 18:12)</a>:</h4>
<p>there's not one we should use for cargo, IMO</p>



<a name="222996689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996689">(Jan 16 2021 at 18:12)</a>:</h4>
<p>Just thought of another way to solve this that's probably cleaner...</p>



<a name="222996692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996692">(Jan 16 2021 at 18:12)</a>:</h4>
<p>the one that exists is __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS but I don't want to use that</p>



<a name="222996709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996709">(Jan 16 2021 at 18:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> I knew about that one, but I thought there was another for command line options.</p>



<a name="222996722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996722">(Jan 16 2021 at 18:13)</a>:</h4>
<p>Not that I can see, but I may have looked in the wrong place.</p>



<a name="222996784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996784">(Jan 16 2021 at 18:14)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> We now have the mechanism to target RUSTC_BOOTSTRAP at specific crates. What if we taught cargo the same thing, and made it look for a specific token if the value isn't just <code>1</code>?</p>



<a name="222996809"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996809" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996809">(Jan 16 2021 at 18:14)</a>:</h4>
<p><code>@cargo</code> for instance.</p>



<a name="222996815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996815">(Jan 16 2021 at 18:14)</a>:</h4>
<p>I thought cargo didn't like inspecting variables it passes to rustc?</p>



<a name="222996817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996817">(Jan 16 2021 at 18:14)</a>:</h4>
<p>seems easier to add CARGO_BOOTSTRAP</p>



<a name="222996854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996854">(Jan 16 2021 at 18:15)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP/near/222996815">said</a>:</p>
<blockquote>
<p>I thought cargo didn't like inspecting variables it passes to rustc?</p>
</blockquote>
<p><a href="https://github.com/rust-lang/cargo/pull/8422#issuecomment-651144736">https://github.com/rust-lang/cargo/pull/8422#issuecomment-651144736</a></p>



<a name="222996858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996858">(Jan 16 2021 at 18:16)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> It isn't needed for bootstrapping cargo, though; it's needed for bootstrapping Rust. ;)</p>



<a name="222996915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996915">(Jan 16 2021 at 18:16)</a>:</h4>
<p>well, DESTABILIZE_CARGO=1, sure :)</p>



<a name="222996928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996928">(Jan 16 2021 at 18:16)</a>:</h4>
<p>fyi there is a <em>lot</em> more breakage even with <code>__TEST_CHANNEL_OVERRIDE</code> set</p>



<a name="222996934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996934">(Jan 16 2021 at 18:17)</a>:</h4>
<p>so I don't think we should change cargo until it works with that first</p>



<a name="222996961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996961">(Jan 16 2021 at 18:17)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> is there something like -Z treat-err-as-bug for commands that bootstrap runs?</p>



<a name="222996962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222996962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222996962">(Jan 16 2021 at 18:18)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> That's saying we don't want to inspect <code>RUSTFLAGS</code>, which makes perfect sense. I don't think it'd be unreasonable to look for a cargo-specific bootstrap token in <code>RUSTC_BOOTSTRAP</code>.</p>



<a name="222997000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997000">(Jan 16 2021 at 18:18)</a>:</h4>
<p>I want to see a backtrace for bootstrap itself</p>



<a name="222997013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997013">(Jan 16 2021 at 18:18)</a>:</h4>
<p>well, the override needs to be set to dev or nightly probably</p>



<a name="222997015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997015">(Jan 16 2021 at 18:18)</a>:</h4>
<p>Specifically, I think that's reasonable because cargo already looks at that variable, to see if the value is 1.</p>



<a name="222997016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997016">(Jan 16 2021 at 18:18)</a>:</h4>
<p>not sure what you set it to</p>



<a name="222997035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997035">(Jan 16 2021 at 18:19)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP/near/222997016">said</a>:</p>
<blockquote>
<p>not sure what you set it to</p>
</blockquote>
<p>oh no the error was from rustc, not cargo</p>
<div class="codehilite"><pre><span></span><code>error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn&#39;t exit successfully: `/home/joshua/rustc3/build/bootstrap/debug/rustc - --crate-name ___ --print=file-names --cfg=bootstrap -Zmacro-backtrace &#39;-Clink-args=-Wl,-rpath,$ORIGIN/../lib&#39; -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 --target x86_64-unknown-linux-gnu --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
  --- stderr
  error: the option `Z` is only accepted on the nightly compiler
</code></pre></div>



<a name="222997047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997047">(Jan 16 2021 at 18:19)</a>:</h4>
<p>bootstrap in general always assumes it can use unstable features :/</p>



<a name="222997192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997192">(Jan 16 2021 at 18:22)</a>:</h4>
<p>I wonder if I can add <code>RUSTC_BOOTSTRAP="{{cli-args}}"</code> or something</p>



<a name="222997198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997198">(Jan 16 2021 at 18:22)</a>:</h4>
<p>as long as it's not a valid crate name it wouldn't conflict</p>



<a name="222997611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997611">(Jan 16 2021 at 18:30)</a>:</h4>
<p>anyway, I won't have time to get to this today. <span class="user-mention" data-user-id="116122">@simulacrum</span> do you think this worth pursuing? I can open an issue if so.</p>



<a name="222997669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997669">(Jan 16 2021 at 18:31)</a>:</h4>
<p>imo, the support for rustc_bootstrap to take a list of crates vs. just one is good for external usage (e.g., by firefox) if there's an absolute need in those codebases to use unstable features</p>



<a name="222997677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997677">(Jan 16 2021 at 18:31)</a>:</h4>
<p>within rust-lang/rust I'm much less worried about that though, because we can directly fix things as needed</p>



<a name="222997683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997683">(Jan 16 2021 at 18:31)</a>:</h4>
<p>so "no" I guess</p>



<a name="222997740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222997740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222997740">(Jan 16 2021 at 18:32)</a>:</h4>
<p>that is, I would accept a patch, but not if it required going to great lengths, and right now it sounds like it would</p>



<a name="222998040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Removing%20unnecessary%20RUSTC_BOOTSTRAP/near/222998040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Removing.20unnecessary.20RUSTC_BOOTSTRAP.html#222998040">(Jan 16 2021 at 18:36)</a>:</h4>
<p>hmm, fair enough</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>